﻿###############################################################################
# Anatomy of a Decision
###############################################################################
#
# A decision is made up of 3 fundamental things:
# 1. a name / key
# 2. an `is_shown` trigger
# 3. a `possible` trigger
# 4. a `when_taken` effect
#
# A decision is evaluated in country scope.
#
#######################################
# Key
#######################################
#
# The key follows the same rules as the keys for any other thing, but it's
# generally accepted that the key for a decision ends with "_decision".
# So for example a decision to build the tour Eiffel could be called
# "build_eiffel_tower_decision"
#
#######################################
# `is_shown` trigger
#######################################
#
# This trigger determines if a decision shows up at all (country scope)
#
#######################################
# `possible` trigger
#######################################
#
# This trigger determines if a decision can be taken (country scope)
#
#######################################
# `when_taken` effect
#######################################
#
# There is nothing special about this effect. It determines what happens when
# a country takes the decision. It follows the same rules as any other effect.
#
#######################################
# `ai_chance` value
#######################################
#
# The scripted weight which determines how likely AI is to take it amongst all possible decisions (country scope).
# Similar to event options. If it evaluates to 0, AI will not take the decision. Evaluates to 1 if unspecified
#
#######################################
# Localization
#######################################
#
# The localization system will look for 3 localized strings for each decision:
# 1. name / key
# 2. description
# 3. tooltip
#
# The key is the same as the decision's key, the description is key + "_desc"
# and the tooltip is key + "_tooltip".
#
# For example, a decision called "build_eiffel_tower_decision" will make the
# game automatically look for the localized strings for:
# 1. "build_eiffel_tower_decision"
# 2. "build_eiffel_tower_decision_desc"
# 3. "build_eiffel_tower_decision_tooltip"
#
# There is nothing much to say about these localization strings, they are
# what they say on the tin.
#
# There is, however, a special localization string: `DECISION_TOOLTIP_FORMAT`.
# It defines the structure of the visible tooltip of each decision.
# This localization receives 3 special values from the localization system:
# 1. `DECISION_TOOLTIP`
# 2. `TRIGGER_SUMMARY`
# 3. `EFFECT_SUMMARY`
#
# `DECISION_TOOLTIP` is the text defined in the <decision_key>_tooltip loc.
#
# `TRIGGER_SUMMARY` provides a description of which of the `error_check`s have
# passed or failed so that the player can see what steps need to be taken to
# be able to take a disabled decision, or why a specific decision can be taken.
#
# `EFFECT_SUMMARY` provides a description of the events that happen when the
# decision is taken.
#
# Therefore, changing `DECISION_TOOLTIP_FORMAT` will change how the tooltip
# of every single decision is presented.
#
#######################################
# Example
#######################################
#
# Here's a silly example decision. It is visible only to countries that:
# 1. have not already taken the decision
# 2. are great powers
#
# And is enabled only for countries that:
# 1. accept the french culture
#
# When the decison is taken:
# 1. the country annexes China
# 2. a variable is set on the country to keep track of the fact that the
#    decision was taken
#
#########
#
# dummy_decision = {
#	  is_shown = {
#	  	  NOT = { has_variable = dummy_decision_taken }
#		   country_rank = rank_value:great_power # only visible to great powers
#	  }
#     possible = {
#         country_has_primary_culture = cu:french # can be taken only by countries where the french culture is primary
#     }
#
#     when_taken = {
#         annex = c:CHI
#         set_variable = {
#             name = dummy_decision_taken
#             value = yes
#         }
#     }
#
#     ai_chance = {
#         base = 20
#         modifier = {
#             trigger = { root = c:RUS }
#             add = 10
#         }
#     }
# }
#
###############################################################################
